import request from '@/utils/request'

// 创建工种类型
export function createSpecialWorkType(data) {
  return request({
    url: '/biz/special-work-type/create',
    method: 'post',
    data: data
  })
}

// 更新工种类型
export function updateSpecialWorkType(data) {
  return request({
    url: '/biz/special-work-type/update',
    method: 'put',
    data: data
  })
}

// 删除工种类型
export function deleteSpecialWorkType(id) {
  return request({
    url: '/biz/special-work-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得工种类型
export function getSpecialWorkType(id) {
  return request({
    url: '/biz/special-work-type/get?id=' + id,
    method: 'get'
  })
}

// 获得工种类型分页
export function getSpecialWorkTypePage(query) {
  return request({
    url: '/biz/special-work-type/page',
    method: 'get',
    params: query
  })
}

// 获得工种类型分页
export function getSpecialWorkTypeListAll() {
  return request({
    url: '/biz/special-work-type/listAll',
    method: 'get'
  })
}

// 导出工种类型 Excel
export function exportSpecialWorkTypeExcel(query) {
  return request({
    url: '/biz/special-work-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
